*x::
    MouseGetPos, rX,rY
    WinGetPos ,wX,wY,wWidth,wHeight,A
    If (Abs(wHeight/2-rY) <2 && Abs(wWidth/2 - rX)<2){
        SysGet, mc, MonitorCount
        If(mc > 1) {

            SysGet, Mon1, MonitorWorkArea, 1
            SysGet, Mon2, MonitorWorkArea, 2
            midle := (wX + wX+wWidth)/2
            ; ToolTip,midle %midle%     wx %wX%     wWidth %wWidth%       m1l %Mon1Left%      m1r %Mon1Right%      m2l %Mon2Left%      m2R %Mon2Right%  
            If ( midle > Mon1Left && midle < Mon1Right){
                ; ToolTip,2
                DllCall("SetCursorPos", "int", (Mon2Left+Mon2Right)/2, "int", (Mon2Top+Mon2Bottom)/2)
            }else{
                ; ToolTip,1
                DllCall("SetCursorPos", "int", (Mon1Left+Mon1Right)/2, "int", (Mon1Top+Mon1Bottom)/2)
            }
        }Else{
            ; ToolTip,%wHeight%     %wWidth%
            MouseMove,wWidth/2,10,0,
        }
    }Else{
        MouseMove, wWidth/2-rX ,wHeight/2-rY,0,r
    }
    MouseGetPos, , , id, control
    WinActivate, ahk_id  %id%
return